<el-row :gutter="10" v-cloak>
    <el-col v-for="item in isearch.cols"
            v-show="item.search=='default'"
            :xs="item.searchOpts.colX?item.searchOpts.colX*12:12"
            :sm="item.searchOpts.colX?item.searchOpts.colX*8:8"
            :md="item.searchOpts.colX?item.searchOpts.colX*6:6"
            :lg="item.searchOpts.colX?item.searchOpts.colX*6:6"
            :xl="item.searchOpts.colX?item.searchOpts.colX*4:4">
        <div class="c-input-suffix">
            <!--
            统一label宽度写法
            :class="isearch.searchLabelSize?'c-label'+isearch.searchLabelSize:''"-->
            <!--根据title长度设置宽度 最小5-->
            <span class="c-label"
                  :class="item.title.length>5?'c-label'+item.title.length:''"
                  v-text="item.title"></span>
            <el-input v-if="!item.searchOpts||item.searchOpts.type=='input'"
                      v-model="isearch.fields[item.field]" :readonly="item.searchOpts.readonly">
                <i v-if="item.searchOpts&&item.searchOpts.icon==true" class="el-icon-search el-input__icon"
                   slot="suffix"
                   @click="handleIconClick(item.field)">
                </i>
            </el-input>
            <template v-if="item.searchOpts">
                <el-date-picker v-if="item.searchOpts.type=='date'"
                                v-model="isearch.fields[item.field]"
                                type="date"
                                format="yyyy-MM-dd"
                                value-format="yyyy-MM-dd"
                                placeholder="选择日期">
                </el-date-picker>
                <el-date-picker v-if="item.searchOpts.type=='month'"
                                type="month"
                                v-model="isearch.fields[item.field]"
                                format="yyyyMM"
                                value-format="yyyyMM">
                </el-date-picker>
                <el-date-picker v-if="item.searchOpts.type=='daterange'"
                                v-model="isearch.fields[item.field]"
                                type="daterange"
                                format="yyyy-MM-dd"
                                value-format="yyyy-MM-dd"
                                style="width:100%"
                                start-placeholder="开始日期"
                                end-placeholder="结束日期">
                </el-date-picker>
                <el-date-picker v-if="item.searchOpts.type=='year'"
                                type="year"
                                v-model="isearch.fields[item.field]"
                                format="yyyy"
                                value-format="yyyy">
                </el-date-picker>
                <el-date-picker v-if="item.searchOpts.type=='MM'"
                                type="month"
                                v-model="isearch.fields[item.field]"
                                format="MM"
                                value-format="MM">
                </el-date-picker>
                <el-select v-if="item.searchOpts.type=='select'" v-model="isearch.fields[item.field]" filterable placeholder="请选择">
                    <el-option
                            v-for="c in item.searchOpts.data"
                            :key="c.code"
                            :label="c.value"
                            :value="c.code">
                    </el-option>
                </el-select>
                <!-- 下拉多选   by yuhuan 2019.1.31  -->
                <el-select v-if="item.searchOpts.type=='selectmultiple'" multiple filterable v-model="isearch.fields[item.field]"
                           placeholder="请选择">
                    <el-option
                            v-for="c in item.searchOpts.data"
                            :key="c.code"
                            :label="c.value"
                            :value="c.code">
                    </el-option>
                </el-select>
            </template>
        </div>
    </el-col>
    <el-col :xs="{span: 12, offset: 0}"
            :sm="{span: 8, offset: 0}" :md="{span: 5, offset: 1}"
            :lg="{span: 5, offset: 1}" :xl="{span: 3, offset: 1}">
        <el-button @click="isearchReset" style="margin-bottom:10px !important">重置</el-button>
        <el-button id="itoSearch" type="primary" @click="itoSearch">搜索</el-button>
    </el-col>
</el-row>